<?php

namespace App\Http\Requests\Admin\AdminUser;

use App\Http\Requests\Admin\Request;

class PasswordRequest extends Request
{
    public function rules()
    {
        return [
            'password' => 'required|min:6|max:20',
            'repassword' => 'required|min:6|max:20|same:password',
        ];
    }

    public function messages()
    {
        return [
            'password.required' => '密码必须',
            'password.max' => '密码最多20个字符',
            'password.min' => '密码最少6个字符',
            'repassword.required' => '密码必须',
            'repassword.max' => '密码最多20个字符',
            'repassword.min' => '密码最少6个字符',
            'repassword.same' => '两次密码必须一致',

        ];
    }
}
